//
//  MineHeaderView.m
//  YongChuanTradingArea
//
//  Created by Vivian on 2017/9/11.
//  Copyright © 2017年 李冰. All rights reserved.
//

#import "MineHeaderView.h"

@implementation MineHeaderView

- (void)awakeFromNib{
    [super awakeFromNib];
    self.iconImgView.layer.masksToBounds = YES;
    self.iconImgView.layer.cornerRadius = 27;
}

- (void)setModel:(UserModel *)model{
    _model = model;
    for (UserModelImgList *list in _model.ImgList) {
        if ([list.imgtype isEqualToString:@"TXTP"]) {
            [self.iconImgView sd_setImageWithURL:[NSURL URLWithString:list.image] placeholderImage:PLACE_HOLDER];
        }
    }
    self.nameLabel.text = _model.MEMBERNAME;
    switch ([_model.USERTYPE integerValue]) {
        case 1:
        {
            self.amtLabel.text = @"消费股东";
        }
            break;
        case 2:
        {
            self.amtLabel.text = @"会员店";
        }
            break;
        case 3:
        {
            self.amtLabel.text = @"企业合伙人";
        }
            break;
        case 4:
        {
            self.amtLabel.text = @"个人合伙人";
        }
            break;
            
        default:
            break;
    }
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
